var baseUrl = `http://47.108.197.28:3000`
function http(url) {
    return new Promise((resolve, reject) => {
        wx.request({
            url: baseUrl + url,
            data: {},
            header: { 'content-type': 'application/json' },
            method: 'GET',
            dataType: 'json',
            responseType: 'text',
            success: (result) => {
                resolve(result)
            },
            fail: (err) => {
                reject(err)
            },
        });
    })
}

function getMusicHttp() {
    return http("/top/playlist")
}
function getMvHttp() {
    return http("/mv/first")
}

module.exports = {
    getMusicHttp,
    getMvHttp
}